package gui;
import javax.swing.JPanel;

/**
 * COPYRIGHT (C) 2009. Denny Tran, Omar Jaime, David Deng, Julie Hsieh. All Rights Reserved
 * Class is a JPanel with extended fields   
 * @author Denny Tran, Omar Jaime, David Deng, Julie Hsieh 
 * @version 1.01 2009-05-05
 */
public abstract class ViewPanel extends JPanel
{
    private String identification; // used to identify this panel
    private static int PANEL_WIDTH = 750;
    private static int PANEL_HEIGHT = 650;
    private ViewManager viewManager;    // register a view manager
    
    /**
     * Construct ViewPanel with specific size and location
     * @param viewManager the container of this panel
     * @param identification specific identification used to reference this panel
     */
    public ViewPanel(ViewManager viewManager, String identification)
    {
        this.viewManager = viewManager;
        this.identification = identification;
        this.setSize(PANEL_WIDTH, PANEL_HEIGHT);
        this.setLayout(null);
    }
    
    /**
     * Returns the specific identification of the panel
     * @return the identification of the panel
     */
    public String getID()
    {
        return identification;
    }
    
    /**
     * Returns the ViewManager which hold this panel
     * @return the viewManager which hold this panel
     */
    public ViewManager getViewManager()
    {
        return viewManager;
    }
    
    /**
     * Abstract method concerning clearing the JComponents of the ViewPanel
     */
    public abstract void clearView();
}
